home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Popular Request
/
By Popular Request (Arsenal Computer)(SysOptics Distribution System).ISO
/
amiga4
/
scsitool.lha
/
SCSIParms.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-06-21
|
1KB
|
58 lines
#include <exec/types.h>
#include <exec/memory.h>
#include <dos/dosextens.h>
#include <clib/exec_protos.h>
#include <clib/alib_protos.h>
#include <clib/dos_protos.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#define BUFSIZE 64*1024
#define TEMPLATE "DEV=DEVICE/K,UNIT/K/N,START=CYLINDER_START/A/N,END=CYLINDER_END/A/N"
#define ARG_DEV 0
#define ARG_UNIT 1
#define ARG_START 2
#define ARG_END 3
#define ARG_NUM 4
struct RDArgs *rda;
ULONG args[ARG_NUM];
int unit=0;
char *device="scsi.device";
int start,end,rem;
void main(void);
void main(void)
{
rda=ReadArgs(TEMPLATE,args,NULL);
if (rda==NULL) {
fprintf(stderr,"?? rda=NULL\n");
exit(20);
}
if (args[ARG_DEV])
device=(char *)args[ARG_DEV];
if (args[ARG_UNIT])
unit=*(ULONG *)args[ARG_UNIT];
if (args[ARG_START])
start=*(ULONG *)args[ARG_START];
if (args[ARG_END])
end=*(ULONG *)args[ARG_END];
printf("DEVICE %s UNIT %d START %d END %d\n",device,unit,
start*200*512,(end+1)*200*512);
FreeArgs(rda);
return(0);
}